home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Intercept
/
Visual Intercept.iso
/
sheriff.z
/
isparmfn.bas
< prev
next >
Wrap
BASIC Source File
|
1996-08-26
|
6KB
|
191 lines
Attribute VB_Name = "IIParameter"
'----------------------------------------------------------------------------
' isparmfn.bas is a member of the Visual Intercept Visual Basic API.
' Copyright (c) 1996 Elsinore Technologies, Inc. All rights reserved.
'
' This software is protected by copyright law. Unauthorized reproduction
' or distribution of this program, or any portion of it, may result in
' severe civil or criminal penalties. If you have any questions about
' your redistribution rights, please contact Elsinore Technologies, Inc.
'
' Creator: Albert J. Lin (AJL)
' History: Created 09/17/95
'----------------------------------------------------------------------------
'----------------------------------------------------------------------------
' Visual Intercept Parameter Declaration:
'----------------------------------------------------------------------------
Public Const parmContact = 0
Public Const parmRelationship = 1
Public Const parmCategory = 2
Public Const parmPriority = 3
Public Const parmSeverity = 4
Public Const parmStatus = 5
Public Const parmOS = 6
Public Const parmNetwork = 7
Public Const parmMachine = 8
Public Const parmModels = 9
Public Const parmCPU = 10
Public Const parmCPUSpeed = 11
Public Const parmCPUCoprocessor = 12
Public Const parmBIOS = 13
Public Const parmVideoCard = 14
Public Const parmVideoResolution = 15
Public Const parmSCSI = 16
Public Const parmCDROM = 17
Public Const parmDrives = 18
Public Const parmFileSystem = 19
Public Const parmManufacture = 20
Public Const parmMouse = 21
Public Const parmMouseBrand = 22
Public Const parmPrinter = 23
Public Const parmPrinterConnection = 24
Public Const parmPrinterCartridge = 25
Public Type VIParameter
name As String
description As String
weight As Double
End Type
Public Type IEParameter
lpName As String
lpDescription As String
weight As Double
lnName As Integer
lnDescription As Integer
End Type
'/* Visual Intercept Parameter API. */
Public Declare Function IIInsertParameter Lib "isapi.dll" (pParameter As IEParameter, ByVal parmType As Long) As Long
Public Declare Function IIDeleteParameter Lib "isapi.dll" (pParameter As IEParameter, ByVal parmType As Long, ByVal clause As String) As Long
Public Declare Function IIModifyParameter Lib "isapi.dll" (pParameter As IEParameter, ByVal parmType As Long, ByVal clause As String) As Long
Public Declare Function IIFetchParameter Lib "isapi.dll" (pParameter As IEParameter, ByVal parmType As Long, ByVal clause As String) As Long
Public Declare Function IIFetchParameters Lib "isapi.dll" (ByRef pnTotal As Long, ByVal parmType As Long, ByVal clause As String) As Long
Public Declare Function IIGetParameter Lib "isapi.dll" (pParameter As IEParameter, ByVal nIndex As Long) As Long
Public Function VBIIInitParameter(Parameter As IEParameter)
Parameter.lnName = lnIIParameter
Parameter.lnDescription = lnIIDescription
Parameter.lpName = String(Parameter.lnName, 0)
Parameter.lpDescription = String(Parameter.lnDescription, 0)
Parameter.weight = 0
End Function
Public Function VBIIFetchParameter(userParameter As VIParameter, ByVal nType As Long, ByRef clause As String) As Long
Dim Parameter As IEParameter
Dim err As Long
Call VBIIInitParameter(Parameter)
Call VBIIPrepareParameter(Parameter, userParameter)
err = IIFetchParameter(Parameter, nType, clause)
If err = 0 Then
Call VBIIConvertParameter(Parameter, userParameter)
End If
VBIIFetchParameter = err
End Function
Public Function VBIIDeleteParameter(userParameter As VIParameter, ByVal nType As Long, ByRef clause As String) As Long
Dim Parameter As IEParameter
Dim err As Long
Call VBIIInitParameter(Parameter)
Call VBIIPrepareParameter(Parameter, userParameter)
err = IIDeleteParameter(Parameter, nType, clause)
VBIIDeleteParameter = err
End Function
Public Function VBIIGetParameter(userParameter As VIParameter, ByVal nIndex As Long) As Long
Dim Parameter As IEParameter
Dim err As Long
Call VBIIInitParameter(Parameter)
err = IIGetParameter(Parameter, nIndex)
If err = 0 Then
Call VBIIConvertParameter(Parameter, userParameter)
End If
VBIIGetParameter = err
End Function
Public Function VBIIInsertParameter(userParameter As VIParameter, ByVal nType As Long) As Long
Dim Parameter As IEParameter
Dim err As Long
Call VBIIInitParameter(Parameter)
Call VBIIPrepareParameter(Parameter, userParameter)
err = IIInsertParameter(Parameter, nType)
VBIIInsertParameter = err
End Function
Public Function VBIIModifyParameter(userParameter As VIParameter, ByVal nType As Long, ByRef clause As String) As Long
Dim Parameter As IEParameter
Dim err As Long
Call VBIIInitParameter(Parameter)
Call VBIIPrepareParameter(Parameter, userParameter)
err = IIModifyParameter(Parameter, nType, clause)
VBIIModifyParameter = err
End Function
Public Function VBIIFetchParameters(ByRef rnTotal As Long, ByVal nType As Integer, ByRef clause As String) As Long
Dim err As Long
err = IIFetchParameters(rnTotal, nType, clause)
VBIIFetchParameters = err
End Function
Public Function VBIIConvertParameter(Parameter As IEParameter, userParameter As VIParameter)
userParameter.name = Parameter.lpName
userParameter.description = Parameter.lpDescription
userParameter.weight = Parameter.weight
End Function
Public Function VBIIPrepareParameter(Parameter As IEParameter, userParameter As VIParameter)
Parameter.lpName = userParameter.name
Parameter.lpDescription = userParameter.description
Parameter.weight = userParameter.weight
Parameter.lnName = Len(userParameter.name)
Parameter.lnDescription = Len(userParameter.description)
End Function